<template>
	<view class="content">
		<!-- <top-userinfo :userusername="userusername" ref="topuserinfo" :parentData="false"></top-userinfo> -->
		<view class="about">
			<rich-text :nodes="about_us" class="text"></rich-text>
		</view>
	</view>
</template>

<script>
	import {commonabout_us} from "@/api/apiinfo";
	// import topuserinfo from './../../components/top_userinfo.vue';
	export default {
		// components:{
		// 	"top-userinfo":topuserinfo
		// },
		data() {
			return {
				about_us:'',
				userusername:''
			}
		},
		onLoad() {
			// let user_name = localStorage.getItem('username')
			// if(user_name == '' || user_name == null){
			// 	user_name = localStorage.getItem('nickname')
			// }
			// this.userusername = user_name;
			// this.$nextTick(() => {
			//     this.$refs.topuserinfo.getuserreload()
			// });
			// let shopid = this.$route.query.id;
			// if(shopid){
			// 	this.getcommonabout_us(shopid)//关于我们
			// }else{
			// 	uni.showToast({
			// 	  title: '获取商户信息错误！',
			// 	  icon: 'none',
			// 	});
			// }
			this.getcommonabout_us()//关于我们
		},
		mounted() {
			
		},
		methods: {
			getcommonabout_us(){ //关于我们
				commonabout_us().then((res) => {
					console.log("关于我们接口返回数据：")
					console.log(JSON.stringify(res));
					this.about_us = res.data.content
				}).catch(err => {
					// console.log(JSON.stringify(err))
					uni.showModal({
						title: '提示',
						content: '关于我们报错：'+err.errMsg,
						showCancel: false,
						success: function (res) {
							if (res.confirm) {
								// uni.switchTab({ //内部页面跳转方式
								// 	url: '/pages/shop/shop'
								// })
							} 
						}
					});
				})
			},
		}
	}
</script>


<style lang="scss">
	.content{
		position: relative;
		.about{
			padding: 30rpx;
		}
	}
	page{
		background-color: #fff;
	}
</style>
